/*
 * Copyright 2018 Samsung Electronics Co., Ltd. and other contributors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

@import '../variables';

/**
 *  Editor wrapper rules.
 */
#editor-wrapper,
#editor-wrapper .row,
#editor-wrapper .row .col-md-12,
#editor-wrapper .row .col-md-12 .panel,
#editor-wrapper .row .col-md-12 .panel {
  position: relative;
  height: 100%;
  margin: 0;
  padding: 0;
}

#editor-wrapper {
  .panel-body {
    padding: 0;

    #monaco {
      position: absolute;
      right: 0;
      bottom: 0;
      z-index: $z-level-5;

      .inactive-breakpoint-line {
        background: $monaco-inactive-breakpoint;
        cursor: pointer;
        z-index: $z-level-4;
      }

      .active-breakpoint-line {
        background: $monaco-active-breakpoint;
        cursor: pointer;
        z-index: $z-level-4;
      }

      .execute-gutter-marker {
        border-top: $editor-execute-border;
        border-bottom: $editor-execute-border;
      }

      .exception-gutter-marker {
        border-top: $editor-exception-border;
        border-bottom: $editor-exception-border;
        background-color: $editor-exception-color;
        filter: none;
      }

      .execute-marker {
        border-top: $editor-execute-border;
        border-right: $editor-execute-border;
        border-bottom: $editor-execute-border;
      }

      .exception-marker {
        border-top: $editor-exception-border;
        border-right: $editor-exception-border;
        border-bottom: $editor-exception-border;
        background-color: $editor-exception-color;
      }
    }
  }

  #editor-placeholder {
    display: none;

    h2 {
      margin: 50px auto;
      text-align: center;
    }

    #start-info {
      width: 200px;
      margin: 0 auto;

      #start-options {
        span {
          color: $b-blue-color;
          &:hover {
            cursor: pointer;
            text-decoration: underline;
          }
        }
      }
    }
  }

  #editor-panel {
    display: flex;
    flex-flow: column;
    height: 100%;
    width: 100%;

    #file-tabs-placeholder {
      position: relative;
      display: none;
      height: 32px;
      font-style: italic;
      opacity: 0.5;
      padding: 5px;
    }

    #file-tabs {
      position: relative;
      padding: 0;
      margin-bottom: 0;
      min-height: 32px;
      flex: 0 1 auto;

      .tablinks {
        transition: $default-transition-time;
        position: relative;
        color: #000;
        text-align: center;
        padding: 5px 25px 5px 5px;
        margin-bottom: -5px;
        text-decoration: none;
        width: 120px;
        height: 31px;
        text-overflow: ellipsis;
        white-space: nowrap;
        overflow: hidden;
        display: inline-block;
        &:hover { background-color: $default-background-color; cursor: pointer; }
        &:focus { background-color: $default-background-color; }
        &.unsaved { text-decoration: underline; }

        i {
          z-index: $z-level-1;
          opacity: $default-opacity;
          position: absolute;
          width: 15px;
          height: 15px;
          top: 2px;
          right: 5px;
          &:hover {
            opacity: 1;
            transform: scale(1.5, 1.5);
          }
        }
      }

      .active {
        background-color: $default-background-color;
      }
    }

    #editor-container {
      flex: 1 1 auto;
      width: 100%;
    }
  }
}
